import request from '@/utils/request'

// 查询房间列表
export function getRoomList(data) {
  return request({
    url: '/rooms/roomsPage',
    method: 'post',
    data,
  })
}
// 查询房间详情
export function getRoomInfo(id) {
  return request({
    url: '/rooms/getRoomsInfo/' + id,
    method: 'get'
  })
}

// 新增房间信息
export function addRoomInfo(data) {
  return request({
    url: '/rooms/addRoomsInfo',
    method: 'post',
    data: data
  })
}

// 修改房间信息
export function updateRoomInfo(data) {
  return request({
    url: '/rooms/updateRoomsInfo',
    method: 'post',
    data: data
  })
}

// 房间状态修改
export function changeRoomStatus(status) {
  return request({
    url: '/rooms/operation/1?status=' + status,
    method: 'get',
  })
}

// 删除房间
export function delRoom(id) {
  return request({
    url: '/rooms/delete/' + id,
    method: 'get'
  })
}
